﻿using PropertyChanged;
using VIA.Integration.Domain.Production;

namespace VIA.SiMoJi.Domain.Option
{
    [AddINotifyPropertyChangedInterface]
    public class DataStorageExOption : DataStorageOption
    {
        /// <summary>
        /// OK原图保存设置
        /// </summary>
        public ImageStorageOption OKSourceImageStorageOption { get; set; } = new();
        /// <summary>
        /// NG原图保存设置
        /// </summary>
        public ImageStorageOption NGSourceImageStorageOption { get; set; } = new();
        /// <summary>
        /// OK结果图保存设置
        /// </summary>
        public ImageStorageOption OKResultImageStorageOption { get; set; } = new();
        /// <summary>
        /// NG结果图保存设置
        /// </summary>
        public ImageStorageOption NGResultImageStorageOption { get; set; } = new();
        /// <summary>
        /// 是否将图片按照产品OK/NG文件夹分别存储
        /// </summary>
        public bool IsUseOKNGFolder { get; set; } = true;
    }

    [AddINotifyPropertyChangedInterface]
    public class ImageStorageOption
    {
        /// <summary>
        /// 是否存图
        /// </summary>
        public bool IsSaveImage { get; set; }
        /// <summary>
        /// 存图格式
        /// </summary>
        public ImageFormat Format { get; set; } = ImageFormat.PNG;
        /// <summary>
        /// 存JPG图像时是否压缩
        /// </summary>
        public bool IsCompression { get; set; }
        /// <summary>
        /// 存JPG图像时压缩系数，范围是1-100，100的时候为不压缩。
        /// </summary>
        public int CompressionRatio { get; set; } = 100;

    }
}
